<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>CKEditor 5 – classic editor build – development sample</title>
	<style>
		body {
			max-width: 800px;
			margin: 20px auto;
		}
	</style>
</head>
<body>

<h1>CKEditor 5 – classic editor build – development sample</h1>

<div id="editor">
</div>

<script src="../build/ckeditor.js"></script>
<script>
	ClassicEditor.create(document.querySelector('#editor'), {
		ckfinder: {
			uploadUrl: `/ckeditor/upload`,
			// 后端处理上传逻辑返回json数据,包括uploaded 上传的字节数 和url两个字段

		},
		imageBrowsing: {
			call: null,
			init: (call) => {
				this.call = call
			},
			open: () => {
				this.call("ll")
				console.log('哈哈哈');
			}
		},
		placeholder: "哈哈",
	})
			.then(editor => {
				window.editor = editor;
			})
			.catch(error => {
				console.error('There was a problem initializing the editor.', error);
			});
</script>

</body>
</html>
